The term “animation” refers to varying over time one or more visual, numeric, or other properties, including but not limited to, location coordinates, variables, strings, and matrixes. Animation can include any time-based operation where something changes. In the computer context, an animation may be displayed on a computer screen. For example, an animation may cause an object to translate, swing, rotate or otherwise change its appearance or location on a display by changing the object's properties. One exemplary animation makes a ball appear to bounce on a computer display screen by changing the ball's position properties over time, e.g., the ball's y-coordinate position in an x,y position space varies over time. As another example, an animation may cause displayed characters or values to change on the display, e.g., “2” changes to “4” changes to “9” etc. An animation can be implemented as a single change, e.g., set the x-coordinate position of the displayed ball to 10. An animation can also be implemented as multiple changes, e.g., set the x-coordinate to 10 at time 1, set the x-coordinate to 12 at time 2, etc. In some cases, an animation can be implemented with respect to one or more changes to one or more existing values, e.g., set the x-coordinate to its current value plus 3, etc. Generally, an animation may comprise a discrete set of changes made with relative frequency to appear continuous, e.g., changing the position of a ball 24 times per second, etc.
FIG. 2a illustrates an effect 200 that causes an animation by calling a function 202 to change a target object 204. Here the function is represented as “foo(value)” with the value specified by the effect 200. The effect 200 may be something specified by an application developer in an application that will use the animation, e.g., the developer may specify that when the application is executed, the effect 200 is initiated when a button on the user interface is clicked. The effect 200 may send multiple function calls to the target 204 to cause an animation. Rather than calling a function, as shown in FIG. 2b an effect 206 may send a command 208 to set a public property “x” on the target object 210.
Two animations may attempt to vary the properties of an object within a same time period or otherwise at the same time. For instance, a first animation may attempt to move a ball up and down while a second animation attempts to move the ball back and forth, so that the ball also appears to bounce left and right at the same time the ball appears to bounce up and down. As another example, the second animation may specify a change of the ball relative to both its x-coordinate and y-coordinate, such that both the first animation and the second animation are attempting to change or set the ball's y-coordinate position property at the same time.
When animations attempt to vary properties of an object at the same time there is a potential for conflicting commands and unintended changes. One solution is to perform only one of the animations, for example, in cases where both animations attempt to start at the same time. Another solution is stop an ongoing animation whenever another animation is received for a given object or object variable. This may involve starting the second animation as if the other had come to a logical conclusion, e.g., the variable value(s) jumps to the end value(s) of the first animation and the second animation begins from that value. As a specific example, a first animation may attempt to move the ball 300 from point A 310 through a series of intermediate positions 320a-e to point B 312 as shown in FIGS. 3a-3b. However, when the ball is at position C 314, a second animation begins that attempt to move the ball up to position D. When the second animation is initiated, the first animation ends, i.e., the ball moves immediately to the end point B 312 of the first animation and the second animation proceeds from there through various intermediate points 330a-e to its final position 330f at end point D 316.
Alternatively, the first animation may stop at its current value(s) and the second animation can begin from that value. As shown in FIG. 3c, when a second animation starts, the first animation can be stopped and the current position 340a (point C 314) can be used as the starting position for the second animation. Because the first animation has been stopped, the second animation causes the ball to move in a straight line, from its current position 340a, through intermediate positions 340b-e, to its final position. Generally, these methods and techniques for dealing with multiple animations may distort the animations or cause other unintended consequences. Unfortunately, performing two or more animations simultaneously (e.g., blending animations) can be complicated and, in current animation and other types of media development, generally requires significant user/developer effort.